﻿
/****** Object:  Table [dbo].[TeamStats]    Script Date: 02/27/2012 02:08:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TeamStats](
	[Id] [uniqueidentifier] NOT NULL,
	[MatchId] [int] NOT NULL,
	[IsHome] [bit] NOT NULL,
	[TeamId] [varchar](100) NOT NULL,
	[MatchDate] [datetime] NOT NULL,
	[Shot2] [int] NOT NULL,
	[Goal2] [int] NOT NULL,
	[Shot3] [int] NOT NULL,
	[Goal3] [int] NOT NULL,
	[FreeThrow] [int] NOT NULL,
	[FreeThrowGoal] [int] NOT NULL,
	[OffensiveRebound] [int] NOT NULL,
	[DefensiveRebound] [int] NOT NULL,
	[Assist] [int] NOT NULL,
	[Foul] [int] NOT NULL,
	[Steal] [int] NOT NULL,
	[Turnover] [int] NOT NULL,
	[Block] [int] NOT NULL,
	[Scoring] [int] NOT NULL,
	[OT] [tinyint] NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[IsDeleted] [bit] NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[TeamInfo]    Script Date: 02/27/2012 02:08:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TeamInfo](
	[TeamId] [uniqueidentifier] NOT NULL,
	[LocalName] [varchar](50) NOT NULL,
	[TeamName] [varchar](50) NOT NULL,
	[TeamEnglishName] [varchar](50) NOT NULL,
	[TeamFullName] [varchar](50) NOT NULL,
	[TeamIndex] [smallint] NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
 CONSTRAINT [PK_TeamInfo] PRIMARY KEY CLUSTERED 
(
	[TeamId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[MatchInfo]    Script Date: 02/27/2012 02:08:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MatchInfo](
	[MatchId] [uniqueidentifier] NOT NULL,
	[SeasonYear] [int] NOT NULL,
	[Type] [tinyint] NOT NULL,
	[MatchDateTime] [datetime] NOT NULL,
	[HomeTeamId] [uniqueidentifier] NOT NULL,
	[VisitingTeamId] [uniqueidentifier] NOT NULL,
	[HomeFirst] [smallint] NOT NULL,
	[VisitingFirst] [smallint] NOT NULL,
	[HomeSecond] [smallint] NOT NULL,
	[VisitingSecond] [smallint] NOT NULL,
	[HomeThird] [smallint] NOT NULL,
	[VisitingThird] [smallint] NOT NULL,
	[HomeFourth] [smallint] NOT NULL,
	[VisitingFourth] [smallint] NOT NULL,
	[HomeOt] [smallint] NOT NULL,
	[VisitingOt] [smallint] NOT NULL,
	[HomeScore] [smallint] NOT NULL,
	[VisitingScore] [smallint] NOT NULL,
	[OtCount] [tinyint] NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
 CONSTRAINT [PK_MatchInfo] PRIMARY KEY CLUSTERED 
(
	[MatchId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[MatchTeamData]    Script Date: 02/27/2012 02:08:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MatchTeamData](
	[MatchDataId] [uniqueidentifier] NOT NULL,
	[MatchId] [uniqueidentifier] NOT NULL,
	[TeamId] [uniqueidentifier] NOT NULL,
	[IsAtHome] [bit] NOT NULL,
	[Shot2] [smallint] NOT NULL,
	[Goal2] [smallint] NOT NULL,
	[Shot3] [smallint] NOT NULL,
	[Goal3] [smallint] NOT NULL,
	[FreeThrow] [smallint] NOT NULL,
	[FreeThrowGoal] [smallint] NOT NULL,
	[OffensiveRebound] [smallint] NOT NULL,
	[DefensiveRebound] [smallint] NOT NULL,
	[Assist] [smallint] NOT NULL,
	[Foul] [smallint] NOT NULL,
	[Steal] [smallint] NOT NULL,
	[Turnover] [smallint] NOT NULL,
	[Block] [smallint] NOT NULL,
	[Scoring] [smallint] NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[IsDeleted] [bit] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Handicap]    Script Date: 02/27/2012 02:08:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Handicap](
	[HandicapId] [uniqueidentifier] NOT NULL,
	[CompanyId] [uniqueidentifier] NOT NULL,
	[MatchId] [uniqueidentifier] NOT NULL,
	[OddsIndex] [smallint] NOT NULL,
	[OddsDateTime] [datetime] NOT NULL,
	[WinLoseHandicap] [float] NOT NULL,
	[ScoreHandicap] [float] NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
 CONSTRAINT [PK_Handicap] PRIMARY KEY CLUSTERED 
(
	[HandicapId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[CompanyInfo]    Script Date: 02/27/2012 02:08:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CompanyInfo](
	[CompanyId] [uniqueidentifier] NOT NULL,
	[CompanyName] [varchar](100) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[IsDeleted] [bit] NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Default [DF_Handicap_OddsIndex]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[Handicap] ADD  CONSTRAINT [DF_Handicap_OddsIndex]  DEFAULT ((0)) FOR [OddsIndex]
GO
/****** Object:  Default [DF_Handicap_OddsDateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[Handicap] ADD  CONSTRAINT [DF_Handicap_OddsDateTime]  DEFAULT ('1900-1-1') FOR [OddsDateTime]
GO
/****** Object:  Default [DF_Handicap_WinLoseHandicap]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[Handicap] ADD  CONSTRAINT [DF_Handicap_WinLoseHandicap]  DEFAULT ((0)) FOR [WinLoseHandicap]
GO
/****** Object:  Default [DF_Handicap_ScoreHandicap]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[Handicap] ADD  CONSTRAINT [DF_Handicap_ScoreHandicap]  DEFAULT ((0)) FOR [ScoreHandicap]
GO
/****** Object:  Default [DF_Handicap_CreateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[Handicap] ADD  CONSTRAINT [DF_Handicap_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
GO
/****** Object:  Default [DF_Handicap_UpdateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[Handicap] ADD  CONSTRAINT [DF_Handicap_UpdateTime]  DEFAULT (getdate()) FOR [UpdateTime]
GO
/****** Object:  Default [DF_Handicap_IsDeleted]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[Handicap] ADD  CONSTRAINT [DF_Handicap_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_MatchInfo_MatchId]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_MatchId]  DEFAULT (newid()) FOR [MatchId]
GO
/****** Object:  Default [DF_MatchInfo_SeasonYear]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_SeasonYear]  DEFAULT ((1900)) FOR [SeasonYear]
GO
/****** Object:  Default [DF_MatchInfo_Type]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_Type]  DEFAULT ((0)) FOR [Type]
GO
/****** Object:  Default [DF_MatchInfo_MatchDateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_MatchDateTime]  DEFAULT ('1900-1-1') FOR [MatchDateTime]
GO
/****** Object:  Default [DF_MatchInfo_VisitingTeamId]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_VisitingTeamId]  DEFAULT ('') FOR [VisitingTeamId]
GO
/****** Object:  Default [DF_MatchInfo_HomeFirst]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_HomeFirst]  DEFAULT ((0)) FOR [HomeFirst]
GO
/****** Object:  Default [DF_MatchInfo_VisitingFirst]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_VisitingFirst]  DEFAULT ((0)) FOR [VisitingFirst]
GO
/****** Object:  Default [DF_MatchInfo_HomeSecond]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_HomeSecond]  DEFAULT ((0)) FOR [HomeSecond]
GO
/****** Object:  Default [DF_MatchInfo_VisitingSecond]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_VisitingSecond]  DEFAULT ((0)) FOR [VisitingSecond]
GO
/****** Object:  Default [DF_MatchInfo_HomeThird]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_HomeThird]  DEFAULT ((0)) FOR [HomeThird]
GO
/****** Object:  Default [DF_MatchInfo_VisitingThird]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_VisitingThird]  DEFAULT ((0)) FOR [VisitingThird]
GO
/****** Object:  Default [DF_MatchInfo_HomeFourth]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_HomeFourth]  DEFAULT ((0)) FOR [HomeFourth]
GO
/****** Object:  Default [DF_MatchInfo_VisitingForth]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_VisitingForth]  DEFAULT ((0)) FOR [VisitingFourth]
GO
/****** Object:  Default [DF_MatchInfo_HomeOt]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_HomeOt]  DEFAULT ((0)) FOR [HomeOt]
GO
/****** Object:  Default [DF_MatchInfo_VisitingOt]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_VisitingOt]  DEFAULT ((0)) FOR [VisitingOt]
GO
/****** Object:  Default [DF_MatchInfo_HomeScore]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_HomeScore]  DEFAULT ((0)) FOR [HomeScore]
GO
/****** Object:  Default [DF_MatchInfo_VisitingScore]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_VisitingScore]  DEFAULT ((0)) FOR [VisitingScore]
GO
/****** Object:  Default [DF_MatchInfo_OtCount]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_OtCount]  DEFAULT ((0)) FOR [OtCount]
GO
/****** Object:  Default [DF_MatchInfo_CreateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
GO
/****** Object:  Default [DF_MatchInfo_UpdateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_UpdateTime]  DEFAULT (getdate()) FOR [UpdateTime]
GO
/****** Object:  Default [DF_MatchInfo_IsDeleted]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo] ADD  CONSTRAINT [DF_MatchInfo_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_MatchTeamData_MatchDataId]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_MatchDataId]  DEFAULT (newid()) FOR [MatchDataId]
GO
/****** Object:  Default [DF_MatchTeamData_Shot2]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_Shot2]  DEFAULT ((0)) FOR [Shot2]
GO
/****** Object:  Default [DF_MatchTeamData_Goal2]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_Goal2]  DEFAULT ((0)) FOR [Goal2]
GO
/****** Object:  Default [DF_MatchTeamData_Shot3]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_Shot3]  DEFAULT ((0)) FOR [Shot3]
GO
/****** Object:  Default [DF_MatchTeamData_Goal3]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_Goal3]  DEFAULT ((0)) FOR [Goal3]
GO
/****** Object:  Default [DF_MatchTeamData_FreeThrow]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_FreeThrow]  DEFAULT ((0)) FOR [FreeThrow]
GO
/****** Object:  Default [DF_MatchTeamData_FreeThrowGoal]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_FreeThrowGoal]  DEFAULT ((0)) FOR [FreeThrowGoal]
GO
/****** Object:  Default [DF_MatchTeamData_OffensiveRebound]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_OffensiveRebound]  DEFAULT ((0)) FOR [OffensiveRebound]
GO
/****** Object:  Default [DF_MatchTeamData_DefensiveRebound]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_DefensiveRebound]  DEFAULT ((0)) FOR [DefensiveRebound]
GO
/****** Object:  Default [DF_MatchTeamData_Assist]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_Assist]  DEFAULT ((0)) FOR [Assist]
GO
/****** Object:  Default [DF_MatchTeamData_Foul]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_Foul]  DEFAULT ((0)) FOR [Foul]
GO
/****** Object:  Default [DF_MatchTeamData_Steal]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_Steal]  DEFAULT ((0)) FOR [Steal]
GO
/****** Object:  Default [DF_MatchTeamData_Turnover]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_Turnover]  DEFAULT ((0)) FOR [Turnover]
GO
/****** Object:  Default [DF_MatchTeamData_Block]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_Block]  DEFAULT ((0)) FOR [Block]
GO
/****** Object:  Default [DF_MatchTeamData_Scoring]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_Scoring]  DEFAULT ((0)) FOR [Scoring]
GO
/****** Object:  Default [DF_MatchTeamData_CreateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
GO
/****** Object:  Default [DF_MatchTeamData_UpdateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_UpdateTime]  DEFAULT (getdate()) FOR [UpdateTime]
GO
/****** Object:  Default [DF_MatchTeamData_IsDeleted]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData] ADD  CONSTRAINT [DF_MatchTeamData_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_TeamInfo_TeamID]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamInfo] ADD  CONSTRAINT [DF_TeamInfo_TeamID]  DEFAULT (newid()) FOR [TeamId]
GO
/****** Object:  Default [DF_TeamInfo_LocalName]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamInfo] ADD  CONSTRAINT [DF_TeamInfo_LocalName]  DEFAULT ('') FOR [LocalName]
GO
/****** Object:  Default [DF_TeamInfo_TeamName]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamInfo] ADD  CONSTRAINT [DF_TeamInfo_TeamName]  DEFAULT ('') FOR [TeamName]
GO
/****** Object:  Default [DF_TeamInfo_TeamEnglishName]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamInfo] ADD  CONSTRAINT [DF_TeamInfo_TeamEnglishName]  DEFAULT ('') FOR [TeamEnglishName]
GO
/****** Object:  Default [DF_TeamInfo_TeamFullName]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamInfo] ADD  CONSTRAINT [DF_TeamInfo_TeamFullName]  DEFAULT ('') FOR [TeamFullName]
GO
/****** Object:  Default [DF_TeamInfo_TeamIndex]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamInfo] ADD  CONSTRAINT [DF_TeamInfo_TeamIndex]  DEFAULT ((0)) FOR [TeamIndex]
GO
/****** Object:  Default [DF_TeamInfo_CreateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamInfo] ADD  CONSTRAINT [DF_TeamInfo_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
GO
/****** Object:  Default [DF_TeamInfo_UpdateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamInfo] ADD  CONSTRAINT [DF_TeamInfo_UpdateTime]  DEFAULT (getdate()) FOR [UpdateTime]
GO
/****** Object:  Default [DF_TeamInfo_IsDeleted]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamInfo] ADD  CONSTRAINT [DF_TeamInfo_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_TeamStats_Id]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_Id]  DEFAULT (newid()) FOR [Id]
GO
/****** Object:  Default [DF_TeamStats_MatchId]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_MatchId]  DEFAULT ((0)) FOR [MatchId]
GO
/****** Object:  Default [DF_TeamStats_IsHome]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_IsHome]  DEFAULT ((0)) FOR [IsHome]
GO
/****** Object:  Default [DF_TeamStats_MatchDate]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_MatchDate]  DEFAULT (getdate()) FOR [MatchDate]
GO
/****** Object:  Default [DF_Table_1_Shot2]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_Table_1_Shot2]  DEFAULT ((0)) FOR [Shot2]
GO
/****** Object:  Default [DF_Table_1_hit2]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_Table_1_hit2]  DEFAULT ((0)) FOR [Goal2]
GO
/****** Object:  Default [DF_TeamStats_Shot3]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_Shot3]  DEFAULT ((0)) FOR [Shot3]
GO
/****** Object:  Default [DF_Table_1_hit3]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_Table_1_hit3]  DEFAULT ((0)) FOR [Goal3]
GO
/****** Object:  Default [DF_TeamStats_FreeThrow]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_FreeThrow]  DEFAULT ((0)) FOR [FreeThrow]
GO
/****** Object:  Default [DF_TeamStats_FreeThrowGoal]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_FreeThrowGoal]  DEFAULT ((0)) FOR [FreeThrowGoal]
GO
/****** Object:  Default [DF_TeamStats_OffensiveRebound]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_OffensiveRebound]  DEFAULT ((0)) FOR [OffensiveRebound]
GO
/****** Object:  Default [DF_TeamStats_DefensiveRebound]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_DefensiveRebound]  DEFAULT ((0)) FOR [DefensiveRebound]
GO
/****** Object:  Default [DF_TeamStats_Assist]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_Assist]  DEFAULT ((0)) FOR [Assist]
GO
/****** Object:  Default [DF_TeamStats_Foul]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_Foul]  DEFAULT ((0)) FOR [Foul]
GO
/****** Object:  Default [DF_TeamStats_Steal]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_Steal]  DEFAULT ((0)) FOR [Steal]
GO
/****** Object:  Default [DF_TeamStats_Turnover]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_Turnover]  DEFAULT ((0)) FOR [Turnover]
GO
/****** Object:  Default [DF_TeamStats_Block]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_Block]  DEFAULT ((0)) FOR [Block]
GO
/****** Object:  Default [DF_TeamStats_Scoring]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_Scoring]  DEFAULT ((0)) FOR [Scoring]
GO
/****** Object:  Default [DF_TeamStats_OT]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_OT]  DEFAULT ((0)) FOR [OT]
GO
/****** Object:  Default [DF_TeamStats_CreateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
GO
/****** Object:  Default [DF_TeamStats_UpdateTime]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_UpdateTime]  DEFAULT (getdate()) FOR [UpdateTime]
GO
/****** Object:  Default [DF_TeamStats_IsDeleted]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[TeamStats] ADD  CONSTRAINT [DF_TeamStats_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  ForeignKey [FK_CompanyInfo_Handicap]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[CompanyInfo]  WITH CHECK ADD  CONSTRAINT [FK_CompanyInfo_Handicap] FOREIGN KEY([CompanyId])
REFERENCES [dbo].[Handicap] ([HandicapId])
GO
ALTER TABLE [dbo].[CompanyInfo] CHECK CONSTRAINT [FK_CompanyInfo_Handicap]
GO
/****** Object:  ForeignKey [FK_Handicap_MatchInfo]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[Handicap]  WITH CHECK ADD  CONSTRAINT [FK_Handicap_MatchInfo] FOREIGN KEY([MatchId])
REFERENCES [dbo].[MatchInfo] ([MatchId])
GO
ALTER TABLE [dbo].[Handicap] CHECK CONSTRAINT [FK_Handicap_MatchInfo]
GO
/****** Object:  ForeignKey [FK_MatchInfo_TeamInfo]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo]  WITH CHECK ADD  CONSTRAINT [FK_MatchInfo_TeamInfo] FOREIGN KEY([HomeTeamId])
REFERENCES [dbo].[TeamInfo] ([TeamId])
GO
ALTER TABLE [dbo].[MatchInfo] CHECK CONSTRAINT [FK_MatchInfo_TeamInfo]
GO
/****** Object:  ForeignKey [FK_MatchInfo_TeamInfo1]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchInfo]  WITH CHECK ADD  CONSTRAINT [FK_MatchInfo_TeamInfo1] FOREIGN KEY([VisitingTeamId])
REFERENCES [dbo].[TeamInfo] ([TeamId])
GO
ALTER TABLE [dbo].[MatchInfo] CHECK CONSTRAINT [FK_MatchInfo_TeamInfo1]
GO
/****** Object:  ForeignKey [FK_MatchTeamData_MatchInfo]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData]  WITH CHECK ADD  CONSTRAINT [FK_MatchTeamData_MatchInfo] FOREIGN KEY([MatchId])
REFERENCES [dbo].[MatchInfo] ([MatchId])
GO
ALTER TABLE [dbo].[MatchTeamData] CHECK CONSTRAINT [FK_MatchTeamData_MatchInfo]
GO
/****** Object:  ForeignKey [FK_MatchTeamData_TeamInfo]    Script Date: 02/27/2012 02:08:17 ******/
ALTER TABLE [dbo].[MatchTeamData]  WITH CHECK ADD  CONSTRAINT [FK_MatchTeamData_TeamInfo] FOREIGN KEY([TeamId])
REFERENCES [dbo].[TeamInfo] ([TeamId])
GO
ALTER TABLE [dbo].[MatchTeamData] CHECK CONSTRAINT [FK_MatchTeamData_TeamInfo]
GO
